<?php

// 8/29/2009: immanuel192 add file_id field to support logo image of the linklist
class imageslider_image {
	function form($object, $config) {
		if (!defined('SYS_FORMS')) require_once(BASE.'subsystems/forms.php');
		exponent_forms_initialize();

		$form = new form();
		if (!isset($object->id)) {
			$object->name = '';
			$object->url = '';
			$object->file_id=0;
		} else {
			$form->meta('id',$object->id);
		}

		$form->register('name','Name',new textcontrol($object->name, 90));
        $form->register("","",new htmlcontrol("<b>Image Slider Naming Agreement</b>:<br><b>Title</b>::<b>Description</b>.<br>If title is null of <b>::</b> not presented, the text you entered is the description."));
		$form->register('url','URL',new textcontrol($object->url, 90));
		$form->register('file_id','Image', new ajax_select_file("file_id",$config->image_col,$object->file_id,true));
		$form->register('submit','',new buttongroupcontrol('Save','','Cancel'));
		return $form;
	}

	function update($values,$object) {
		$object->name = $values['name'];
		$object->url = $values['url'];
		$object->file_id = $values['file_id'];
		return $object;
	}
}

?>